<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!-- 头部 -->
<script src="/resources/js/sockjs.min.js"></script>
<script src="/resources/js/stomp.js_2.3.3_stomp.js"></script>
<script src="/resources/socket/chat.js"></script>
<script>
    var branchid = '${sessionScope.employee.branchesId}';
</script>
<header>
    <input type="hidden" id="currentuid" value='<shiro:principal property="id"/>'/>
    <audio id="myAudio">
        <source src="/resources/audio/notify.mp3" type="audio/mpeg">
        <source src="/resources/audio/notify.ogg" type="audio/ogg">
        <source src="/resources/audio/notify.wav" type="audio/wav">
    </audio>
    <!-- logo -->
    <div class="am-fl tpl-header-logo">
        <a href="javascript:;"><img src="/resources/img/logo.png" alt=""></a>
    </div>
    <!-- 右侧内容 -->
    <div class="tpl-header-fluid">
        <!-- 侧边切换 -->
        <div class="am-fl tpl-header-switch-button am-icon-list">
                <span>

            </span>
        </div>
        <!-- 搜索 -->
        <div class="am-fl tpl-header-search">
            <form class="tpl-header-search-form" action="javascript:;">
                <button id="searchInputBtn" class="tpl-header-search-btn am-icon-search"></button>
                <input id="searchinput" class="tpl-header-search-box" type="text" placeholder="搜索内容...">
            </form>
            <script>
                function goBaidu(){
                    window.location.href = "http://www.baidu.com";
                }
                $('#searchinput').bind('keydown',function(){
                    goBaidu();
                });
                $("#searchInputBtn").click(function () {
                    goBaidu();
                })
            </script>
        </div>
        <!-- 其它功能-->
        <div class="am-fr tpl-header-navbar">
            <ul>
                <!-- 欢迎语 -->
                <li class="am-text-sm tpl-header-navbar-welcome">
                    <a href="javascript:;">欢迎${typetrust}, <span>${adminName}使用本系统</span> </a>
                </li>

                <!-- 内部消息邮件 -->
                <li class="am-dropdown tpl-dropdown" data-am-dropdown>
                    <a href="javascript:;" class="am-dropdown-toggle tpl-dropdown-toggle" data-am-dropdown-toggle>
                        <i class="am-icon-envelope"></i>
                        <span class="am-badge am-badge-success am-round item-feed-badge" id="msgCount">0</span>
                    </a>
                    <!-- 弹出列表 -->
                    <ul class="am-dropdown-content tpl-dropdown-content" id="callMsg">
                        <li class="tpl-dropdown-menu-messages">
                            <a href="/message/ref" class="tpl-dropdown-menu-messages-item am-cf">
                                <i class="am-icon-circle-o"></i> 进入列表…
                            </a>
                        </li>
                    </ul>
                </li>

                <!-- 新进货提示 -->
                <%--<li class="am-dropdown" data-am-dropdown>
                    <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle>
                        <i class="am-icon-bell"></i>
                        <span class="am-badge am-badge-warning am-round item-feed-badge">5</span>
                    </a>

                    <!-- 弹出列表 -->
                    <ul class="am-dropdown-content tpl-dropdown-content">
                        <li class="tpl-dropdown-menu-notifications">
                            <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                <div class="tpl-dropdown-menu-notifications-title">
                                    <i class="am-icon-line-chart"></i>
                                    <span> 有6笔新的进货申请</span>
                                </div>
                                <div class="tpl-dropdown-menu-notifications-time">
                                    12分钟前
                                </div>
                            </a>
                        </li>
                        <li class="tpl-dropdown-menu-notifications">
                            <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                <div class="tpl-dropdown-menu-notifications-title">
                                    <i class="am-icon-star"></i>
                                    <span> 有3个来自分店的的消息</span>
                                </div>
                                <div class="tpl-dropdown-menu-notifications-time">
                                    30分钟前
                                </div>
                            </a>
                        </li>
                        <li class="tpl-dropdown-menu-notifications">
                            <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                <div class="tpl-dropdown-menu-notifications-title">
                                    <i class="am-icon-folder-o"></i>
                                    <span> 新录入的数据</span>
                                </div>
                                <div class="tpl-dropdown-menu-notifications-time">
                                    1天前
                                </div>
                            </a>
                        </li>


                        <li class="tpl-dropdown-menu-notifications">
                            <a href="" class="tpl-dropdown-menu-notifications-item am-cf">
                                <i class="am-icon-bell"></i> 进入列表…
                            </a>
                        </li>
                    </ul>
                </li>--%>

                <!-- 退出 -->
                <li class="am-text-sm">
                    <a href="/logout">
                        <span class="am-icon-sign-out"></span> 退出
                    </a>
                </li>
            </ul>
        </div>
    </div>

</header>
<!-- 风格切换 -->
<div class="tpl-skiner">
    <div class="tpl-skiner-toggle am-icon-cog">
    </div>
    <div class="tpl-skiner-content">
        <div class="tpl-skiner-content-title">
            选择主题
        </div>
        <div class="tpl-skiner-content-bar">
            <span class="skiner-color skiner-white" data-color="theme-white"></span>
            <span class="skiner-color skiner-black" data-color="theme-black"></span>
        </div>
    </div>
</div>
<!-- 侧边导航栏 -->
<div class="left-sidebar">
    <!-- 用户信息 -->
    <div class="tpl-sidebar-user-panel">
        <div class="tpl-user-panel-slide-toggleable">
            <div class="tpl-user-panel-profile-picture">
                <img src="/resources/img/111.jpg" alt="">
            </div>
        </div>
    </div>
    <!-- 菜单 -->
    <ul class="sidebar-nav">
        <li class="sidebar-nav-heading">导航菜单 <span class="sidebar-nav-heading-info"> </span></li>
        <li class="sidebar-nav-link">
            <a href="/index" class="active">
                <i class="am-icon-home sidebar-nav-link-logo"></i> 首页
            </a>
        </li>
        <c:forEach items="${sessionScope.mlist}" var="menu" varStatus="status">
            <c:if test="${menu.parentId==0}">
                <li class="sidebar-nav-link">
                        <a href="javascript:;" class="sidebar-nav-sub-title">
                            <i class="${menu.icon} sidebar-nav-link-logo"></i> ${menu.name}
                        <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                    </a>
                    <ul class="sidebar-nav sidebar-nav-sub">
                        <c:forEach items="${sessionScope.mlist}" var="cmenu">
                            <c:if test="${menu.id == cmenu.parentId}">
                                <%--<shiro:hasPermission name="${cmenu.href}">--%>
                                <li class="sidebar-nav-link">
                                    <a href="${cmenu.href}">
                                        <span class="am-icon-angle-right sidebar-nav-link-logo"></span> ${cmenu.name}
                                    </a>
                                </li>
                                <%--</shiro:hasPermission>--%>
                            </c:if>
                        </c:forEach>
                    </ul>
                </li>
            </c:if>
        </c:forEach>


    </ul>
</div>
<script>
    Window.onload= connect();
</script>
